<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css" />
		<link rel="stylesheet" type="text/css" href="../../css/style.css" />
		<link rel="stylesheet" type="text/css" href="../../css/btnplus.css" />
		<style type="text/css">
			html,body { background-color:#fff; }
			.back_money{ background-color:#fcfdfe; padding: 0; overflow: hidden;}
			.back_money .top{ padding: 15px 15px 0;}
			.back_money .top li{ border-radius: 6px 6px 0 0; padding: 10px 10px; background: linear-gradient(to right, #e2af31, #f2ce7e); box-shadow: 0 0 10px rgba(226,175,51,0.3); color: #fff; overflow: hidden;}
			.back_money img { width:34px; margin-right:5px; }
			.back_money .top p{ font-size: 15px; opacity: 0.9; line-height: 20px;}
			.back_money .top b{ display:block; font-size: 30px; font-weight: 500; line-height: 30px; padding-top: 7px;}
			.back_money .top span{ font-size: 12px; opacity: 0.9; line-height: 20px;}
			.back_money .list{ background-color:#fff;box-shadow: 0 -3px 5px rgba(226,175,51,0.33); }
			.back_money .list li{ position: relative;padding: 7px 15px; }
			.back_money .list li::after{ display:block; position: absolute; content: ""; left: 0; right: 0; bottom: 0; height: 1px; background-color: #dedede; overflow: hidden; transform: scaleY(0.5);}
			
			.back_money .list p{ display:block; font-size: 14px; color: #333; line-height: 37px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis; }
			.back_money .list .m_cell_ft p{ color:#666;}
			.back_money .list i{ color:#10b574;}
			.sk-three-bounce {
			  margin: 0 auto;
			  width: 80px;
			  text-align: center; }
			  .sk-three-bounce .sk-child {
				width: 13.5px;
				height: 13.5px;
				background-color: #3262F1;
				border-radius: 100%;
				display: inline-block;
				-webkit-animation: sk-three-bounce 1.4s ease-in-out 0s infinite both;
						animation: sk-three-bounce 1.4s ease-in-out 0s infinite both; }
			  .sk-three-bounce .sk-bounce1 {
				-webkit-animation-delay: -0.32s;
						animation-delay: -0.32s; }
			  .sk-three-bounce .sk-bounce2 {
				-webkit-animation-delay: -0.16s;
						animation-delay: -0.16s; }

			@-webkit-keyframes sk-three-bounce {
			  0%, 80%, 100% {
				-webkit-transform: scale(0);
						transform: scale(0); }
			  40% {
				-webkit-transform: scale(1);
						transform: scale(1); } }

			@keyframes sk-three-bounce {
			  0%, 80%, 100% {
				-webkit-transform: scale(0);
						transform: scale(0); }
			  40% {
				-webkit-transform: scale(1);
						transform: scale(1); }
			}
			.more{ padding: 1.20rem 0; text-align: center; font-size: 0.26rem; color: #999; line-height: 0.60rem;}
			.display-none{ display:none; }
			.text-center { text-align: center !important; }
			.m_cell_ft1 { display: table-cell; vertical-align: top; word-wrap: break-word; word-break: break-all; overflow: hidden;}
			.color0{ color: #0072E1 !important;}
			.color1{ color: #10B574 !important;}
			.color2{ color: #EC7575 !important;}
		</style>
	</head>
	<body>
		<div id="creditdetail">
		</div>
		<script id="creditdetail_template" type="text/template">
		<!--返还start-->
		<div class="back_money">
			
			<ul class="top">
				<li>
				<div class="m_cell_hd"><img src="../../image/txstatus{{=it.txstatus}}.png" /></div>
				<div class="m_cell_hd m_cell_primary">
					<p>{{? it.txstatus == 0}}提现审核中{{?? it.txstatus == 1}}提现成功{{?? it.txstatus == 2}}提现失败{{?}}</p>
				</div>
				{{? it.txstatus == 2}}
				<div><span>{{=it.refusereason}}</span></div>
				{{?}}
				</li>
			</ul>
			<ul class="list">
				<li>
					<div class="m_cell_hd m_cell_primary"><p>申请时间</p></div>
					<div class="m_cell_ft"><p>{{=it.createtime}}</p></div>
				</li>
				<li>
					<div class="m_cell_hd m_cell_primary"><p>提现金额</p></div>
					<div class="m_cell_ft"><p>￥{{=it.credit}}</p></div>
				</li>
				<li>
					<div class="m_cell_hd m_cell_primary"><p>持卡人</p></div>
					<div class="m_cell_ft"><p>{{=it.txrealname}}</p></div>
				</li>
				<li>
					<div class="m_cell_hd m_cell_primary"><p>银行卡号</p></div>
					<div class="m_cell_ft"><p>{{=it.bankcard}}</p></div>
				</li>
				<li>
					<div class="m_cell_hd m_cell_primary"><p>银行</p></div>
					<div class="m_cell_ft"><p style="width:auto;">{{=it.bankname}}</p></div>
				</li>
				<li>
					<div class="m_cell_hd m_cell_primary"><p>提现单号</p></div>
					<div class="m_cell_ft"><p>{{=it.tixianno}}</p></div>
				</li>
				
			</ul>
		</div>
		<!--返还end-->
		</script>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/app.js"></script>
	<script type="text/javascript" src="../../script/doT.js"></script>
	<script type="text/javascript">
		var logid;
		var UILoading;
		apiready = function() {
			api.parseTapmode();
			UILoading = api.require('UILoading');
			logid = api.pageParam.logid;
			showloading();
			getJsonFromAPI();
			
			api.addEventListener({
                name: 'navitembtn'
            }, function(ret, err) {
                if (ret.type == 'left') {
					api.closeWin({
					});
                }
            });
			api.addEventListener({
				name : 'reloadpage'
			}, function(ret, err) {
				getJsonFromAPI();				
			});
		}
		function getJsonFromAPI() {
			//从接口获取查询数据
			api.getPrefs({
				key: 'user_info'
			}, function(ret, err) {
				if (ret.value) {
					var userinfo = JSON.parse(ret.value);
					api.ajax({
						url: ApiUrl + '/v1/creditdetail/'+logid,
						method: 'get',
						cache: false,
						timeout: 10,
						headers: {
							authorization: kAppKey+';'+userinfo.access_token+';'+userinfo.uid
						}
					}, function(ret, err) {
						hideloading();
						if (ret) {
							console.log(JSON.stringify(ret.credit));
							
							var creditdetail = ret.credit;
							UpdateList('creditdetail','creditdetail_template',creditdetail);
							

						} else {
							if(err.statusCode==402)
							{
								Relogin();
							}
							else
							{
								toast('网络异常');
								console.log(JSON.stringify(err));
							}
						}
					});
				}
			});
		}
		//渲染数据
		function UpdateList(domId,templateId,jsondata) {
			var act_content = $api.byId(domId);
			var tempFn = doT.template($api.byId(templateId).innerHTML);
			var resultText = tempFn(jsondata);
			$api.html(act_content, resultText);
			api.parseTapmode();
			//setTimeout(function() {
				//showposition();
			//}, 3000);
			
		}
	</script>
</html>